import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'
import vueSetupExtend from 'vite-plugin-vue-setup-extend'
import vueJsx from '@vitejs/plugin-vue-jsx'
export default defineConfig({
  base: '/keep-alive-vue3',
  build: {
    target: 'esnext',
  },
  plugins: [
    vue({
      reactivityTransform: true, // defineProps<{ name: string }>()
    }),
    vueSetupExtend(), // support script setup name
    vueJsx(), // support jsx
  ],
  resolve: {
    alias: {
      '@': path.resolve(__dirname, './src'),
    },
  },
})
